package com.rfid;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class DirectoryBean implements Serializable {

    String path;
    List<FileEntity> children = new ArrayList<>();

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public List<FileEntity> getChildren() {
        return children;
    }

    public void setChildren(List<FileEntity> children) {
        this.children = children;
    }

    public static class FileEntity implements Serializable{
        String path;
        long length;
        boolean isFile;

        public String getPath() {
            return path;
        }
        public void setPath(String path) {
            this.path = path;
        }

        public long getLength() {
            return length;
        }

        public void setLength(long length) {
            this.length = length;
        }

        public boolean isFile() {
            return isFile;
        }

        public void setFile(boolean file) {
            isFile = file;
        }

        @Override
        public String toString() {
            return "FileEntity{" +
                    "path='" + path + '\'' +
                    ", length=" + length +
                    ", isFile=" + isFile +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "DirectoryBean{" +
                "path='" + path + '\'' +
                ", children=" + children +
                '}';
    }
}
